package HotelOfPumpkin.Desktop.internal;

import java.util.Random;

/**
 * 
 */

/**
 * @author Chensc
 *
 */
public class Dice {
	
	private Random mRandom;
	private int surface;

	/**
	 * @param surface
	 */
	public Dice(int surface) {
		this.surface = surface;
		mRandom = new Random();
	}
	
	/**
	 * @return
	 */
	public int getSurface() {
		return surface;
	}
	
	/**
	 * @return
	 */
	public int getDiceNumber() {
		return mRandom.nextInt(surface) + 1;
	}

	/**
	 * @param surface
	 * @return 
	 */
	static public int getDiceNumber(int surface) {
		return new Random().nextInt(surface) + 1;
	}
}
